import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'

import router from './router/index'
import ElementPlus from 'element-plus'

import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';


import 'element-plus/dist/index.css'
import store from './stores/index'
import './assets/main.css'
import echarts from "./echarts/echarts"
import axios from 'axios'
import getRoutes from '../src/grants/router'

const app = createApp(App)
app.config.globalProperties.$echarts = echarts
app.use(createPinia())
app.use(ElementPlus)
app.use(Antd);

if (sessionStorage.getItem("grants")) {
    getRoutes();
}

app.use(router)
getRoutes();
app.mount('#app')
